package com.qww.exec01;

class Cycle {
    public Cycle ride() {
        System.out.println("Cycle ride..." + this.getClass().getSimpleName());
        return this;
    }
}

class Unicycle extends Cycle {
    @Override
    public Cycle ride() {
        System.out.println("Unicycle ride...");
        return this;
    }
}

class Bicycle extends Cycle {
    @Override
    public Cycle ride() {
        System.out.println("Bicycle ride...");
        return this;
    }
}

class Tricycle extends Cycle {
    @Override
    public Cycle ride() {
        System.out.println("Tricycle ride...");
        return this;
    }
}

public class Exec01 {
    public static void main(String[] args) {
        Cycle x1 = new Unicycle().ride();
        Cycle x2 = new Bicycle().ride();
        Cycle x3 = new Tricycle().ride();
    }
}